<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html>
<head>
	<title>
		<c:if test="${empty recepient.recepientId}"><spring:message code="YYK-20032" /></c:if>
		<c:if test="${not empty recepient.recepientId}"><spring:message code="YYK-20033" /></c:if>
	</title>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="viewport" content="width=device-width, initial-scale=0.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0" />
	<meta name=”apple-mobile-web-app-capable” content=”yes” />
	<script type="text/javascript">
		;(function (doc, win) {
		    var docEl = doc.documentElement,
		      resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize',
		      recalc = function () {
		        var clientWidth = docEl.clientWidth;
		        var clientHeight = docEl.clientHeight;
		        if (!clientWidth) return;
		            docEl.style.fontSize = 100 * (clientWidth / 640) + 'px';
		      };
		      recalc();
		    if (!doc.addEventListener) return;
		    win.addEventListener(resizeEvt, recalc, false);
		    doc.addEventListener('DOMContentLoaded', recalc, false);
		})(document, window);
	</script>
	<link rel="stylesheet" href="${static_server}/static/css/common/zepto.alert.css">
	<link rel="stylesheet" href="${static_server}/static/css/default.css">
	<link rel="stylesheet" href="${server}/static/css/iconfont/iconfont.css">
	<link rel="stylesheet" href="${static_server}/static/css/recevingAddress.css">
	
	<script type="text/javascript" src="${static_server}/static/js/common/base.js"></script>
	<script type="text/javascript" src="${static_server}/static/js/zepto.min.js"></script>
	<script type="text/javascript" src="${static_server}/static/js/common/zepto.alert.js"></script>
	<script type="text/javascript" src="${static_server}/static/js/common/common.js"></script>
	<script type="text/javascript" src="${static_server}/static/js/common.js"></script>
	<script type="text/javascript" src="${static_server}/static/js/common/common.ajax.js"></script>
	
</head>
<body>
<div class="wrap">
	<header class="headerToFixed">
		<header class="headerToFixed">
		<div class="closeBtn" onclick="javascript:goBack();">
		   <i class="icon iconfont">&#xe60a;</i>
		</div>
		<div class="headerTitle">
			<c:if test="${empty recepient.recepientId}"><spring:message code="YYK-20032" /></c:if>
			<c:if test="${not empty recepient.recepientId}"><spring:message code="YYK-20033" /></c:if>
		</div>
	
	</header>
	</header>
	<div class="contentWrap">
		<div class="addNewAddressComponent">
			<form action="${server}/address/update" method="post" name="address-form">
				<ul class="basicInfo">
				 	<li>
				 		<%-- 收货人姓名 --%>
				 		<label for="receivingName"><spring:message code="YYK-20034" /></label>
				 		<input id="receivingName" type="text" maxlength="10" placeholder="<spring:message code="YYK-20038"/>" name="recepientName" value="${recepient.recepientName}"/>
				 	</li>
				 	<li>
				 		<%-- 手机号码 --%>
				 		<label for="receivingTel"><spring:message code="YYK-20035" /></label>
				 		<input id="receivingTel" type="text" maxlength="11" placeholder="<spring:message code="YYK-20039"/>" name="recepientTel" value="${recepient.recepientTel}"/>
				 	</li>
				 	<li id="J_province">
				 		<%-- 收货地址 --%>
				 		<label><spring:message code="YYK-20024" /></label>
				 		<div class="moreBtn fr">
				 			<i class="icon iconfont">&#xe603;</i>
				 		</div>
				 		<input type="hidden" name="recepientId" value="${recepient.recepientId}"/>
				 		<input type="hidden" name="recepientProvinceId" value="${recepient.recepientProvinceId}"/>
				 		<input type="hidden" name="recepientCityId" value="${recepient.recepientCityId}"/>
				 		<input type="hidden" name="recepientAreaId" value="${recepient.recepientAreaId}"/>
			 			<div class="yet" id="btn-select-region" onclick="javascript:findAllProvince();">
				            <div class="yetleft">
								<div class="address">
									<span class="provi_city_area_id">
										${recepient.recepientProvinceName} ${recepient.recepientCityName} ${recepient.recepientAreaName}
									</span>
								</div>
							</div>		
							
				            <div class="yetright" hidden="hidden">
				                    <div class="closeBtn">
									   <i class="icon iconfont">&#xe600;</i>
									</div>
				            </div>
				        </div>
			 		<div class="filter-wrap" id="J_filterWrap">
					    <header id="header" class="head">
					    <a href="javascript:;" class="goback closeBtn"><i></i><b></b></a>
					        <h2 class="h-title"><spring:message code="YYK-20024" /></h2>
					    </header>
					    <div class="filter-bd">
							<!-- 省份 -->
							<div class="filter-item J_filterContents" id="stock_province_item">
								 <ul>
								 	
								 </ul>
							</div>
							<!-- 市 -->
							 <div id="stock_city_item" class="filter-item J_filterContents" style="display: none;">
									<ul id="show_city">
										<!-- <li><a href="javascript:void(0);" city_id="330100" flag = "city" class="data_area">杭州市</a></li> -->
									</ul>
					         </div>
							 <!-- 县 -->
							<div id="stock_area_item" class="filter-item J_filterContents" style="display: none;">
									<ul id="show_area">
										<!-- <li><a href="javascript:void(0);" area_id="330203" flag = "area" class="select_area_js">海曙区</a></li> -->
									</ul>
					         </div>
					    </div>
					</div>
				 	</li>
				 	<li>
				 		<label for="street"><spring:message code="YYK-20036" /></label>
				 		<input id="street" type="text" maxlength="50" placeholder="<spring:message code="YYK-20040"/>" name="recepientAddress" value="${recepient.recepientAddress}"/>
				 	</li>
				 </ul>
			 </form>
		</div>
	</div>
	<footer class="footerToFixed" style="bottom:20px;">
		<!-- <div class="borderTop1"></div> -->
		<div class="submitAddress addNewAddressBtn" onclick="javascript:updateAddress();" style="margin:0 auto;">
			<spring:message code="YYK-20037" /> 
		</div>
	</footer>
</div>
<input type="hidden" value="${server}" id="path"/>
<script type="text/javascript" src="${static_server}/static/js/common/region.js"></script>
<script type="text/javascript" src="${static_server}/static/js/settlement/address.js"></script>
</body>
</html>	